const express = require('express');
const router = express.Router();
const cartController = require('../controllers/cart');
const { verifyToken } = require('../middlewares/auth');

router.use(verifyToken);

router.get('/', cartController.getCart);
router.post('/', cartController.addToCart);
router.put('/:id', cartController.updateCartItem);
router.delete('/:id', cartController.removeFromCart);
router.delete('/', cartController.clearCart);

module.exports = router;    